package cn.thoughtworks.school.repositories;

import cn.thoughtworks.school.entities.SurveyQuiz;
import cn.thoughtworks.school.entities.SurveyQuizSubmission;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

public interface SurveyQuizSubmissionRepository extends JpaRepository<SurveyQuizSubmission, Long>,JpaSpecificationExecutor<SurveyQuiz> {

    List<SurveyQuizSubmission> findByQuizIdInAndAssignmentIdAndUserIdOrderByIdDesc(List<Long> ids, Long assignmentId, Long userId);
}
